import request from '@/utils/request.js'

export const artGetChannelServices = () => request.get('/my/cate/list')

export const artAddChannelServices = (data) => request.post('/my/cate/add', data)
export const artEditChannelServices = (data) => request.put('/my/cate/info', data)

export const artDelChannelServices = (data) =>
  request.delete('/my/cate/del', { params: { id: data } })
export const artListGet = (data) =>
  request.get('/my/article/list', {
    params: data
  })
// data必须是一个formData格式
export const artPublishService = (data) => request.post('/my/article/add', data)

export const artGetArticleService = (id) => request.get('/my/article/info', { params: { id: id } })
export const artSaveArticleService = (data) => request.put('/my/article/info', data)

export const artDeleteService = (id) => request.delete('/my/article/info', { params: { id: id } })
